//With Commons.Lang, you could simply use ArrayUtils.reverse(int[] array) // For reversing subarray ArrayUtils.reverse(int[] array,int startIndexInclusive, int endIndexExclusive)
WWWWW- S---W- W-W-W- W-W--- E-W-W- WWWWW-